//
//  MAKTableViewCellModel.h
//  MAKCommon
//
//  Created by zhuwh on 2020/3/27.
//  Copyright © 2020 mark. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol MAKTableViewCellModel <NSObject>

@required

/**
 Cell对应的类

 @return cell类
 */
- (Class )cellClass;

@optional
/**
 Cell对应的重用标识

 @return cell重用字符串
 */
- (NSString *)cellIdentifier;


@end

static const NSInteger kTableActionNull = 0;

@interface MAKTableViewCellModel<__covariant ObjectType> : NSObject<MAKTableViewCellModel>

- (instancetype)initWithModel:(ObjectType)model actionId:(NSInteger)actionId;
- (instancetype)initWithModel:(ObjectType)model;

@property (nonatomic, readonly) ObjectType model;
@property (nonatomic, readonly) NSInteger actionId;
@property (nonatomic, assign) NSInteger cacheHeight; // < 0 表示自适应
@property (nonatomic, assign) BOOL enableCacheHeight; //开启高度缓存，默认开启

@end

NS_ASSUME_NONNULL_END
